package de.vogella.android.touch.single;

import com.android.drawing.ImageDrawer;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Main extends Activity{
	ImageDrawer imageView1;
	Button button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
	    imageView1 = (ImageDrawer) this.findViewById(R.id.imageView1);
	    int width = getWindowManager().getDefaultDisplay().getWidth()-10;
		imageView1.setSize(width, width);
		
		button = (Button)findViewById(R.id.button1);
		button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				imageView1.emptyImage();				
			}
		});
	    
	}
	

}
